﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Iworld.ViewModel
{
    /// <summary>
    /// 描述程序主界面
    /// </summary>
    /// <typeparam name="TPage">界面标识枚举</typeparam>
    public interface IMainPage<TPage, TPop>
        where TPage : struct
        where TPop : struct 
    {
        /// <summary>
        /// 显示目标子界面
        /// </summary>
        /// <param name="userControl">所要显示的子界面</param>
        void Show(UIElement element);

        /// <summary>
        /// 关闭主窗口
        /// </summary>
        void CloseMainWindow();

        /// <summary>
        /// 源数据
        /// </summary>
        object DataContext { get; set; }

        /// <summary>
        /// 注册可跳转界面
        /// </summary>
        void RegisterViews(ViewModelServiceBase<TPage,TPop> service);
    }
 
}
